LDRA Testbed ® Code Review Report

Group : IRSSI-fe-none






Overall Result: FAIL






Report Production Report Configuration Analysis phases
  • C/C++ LDRA Testbed Version: 8.1.0
  • Config. File: C:\Testbed_CCPP_810\c\creport.dat
  • Produced On: Thu Sep 03 2009 at 11:32:25
  • Penalty File: C:\Testbed_CCPP_810\c\cpen.dat
  • Report Level: Summary Report
  • Procedures Reported: Fails Only
  • Programming Standards Model: CERT
  • Line Numbers refer to: Original Source File
  • Violation Details: Violations Only
  • Reporting Scope: Full analysis scope
  • Static: Yes
  • Complexity: Yes
  • Static Data Flow: No
  • Information Flow: No
  • Cross Reference: No


Contents

Overall Quality Summary
Report on Program Components
Key to Terms





Overall Quality Summary



Totals of Violations for Selected Quality Standards

'-' indicates required Analysis Phase results are not yet available.
'Off' indicates that the standard is switched off in the Penalty File (<lang>pen.dat).
'MR'indicates that the standard is Misra Restricted.

Number of Violations LDRA Code (M) Mandatory Standards CERT Code
0
9 S CERT PRE31-C,EXP30-C,EXP31-C,FIO41-C
0
20 S CERT DCL31-C
0
30 S CERT EXP30-C,EXP31-C
-
5 D CERT EXP33-C
0
39 S CERT FLP30-C
0
43 S CERT ENV33-C,SIG32-C
0
47 S CERT ARR30-C
0
71 S CERT DCL30-C,MEM36-C
0
86 S CERT ERR31-C
0
93 S CERT INT01-C,INT02-C,INT07-C
0
94 S CERT EXP11-C,EXP36-C,INT11-C
6
98 S CERT EXP37-C
-
17 D CERT DCL32-C
-
19 D CERT EXP37-C
-
20 D CERT DCL31-C,ERR30-C
-
24 D CERT DCL31-C
-
1 X CERT ARR31-C
0
134 S CERT EXP10-C,EXP30-C
-
35 D CERT EXP02-C,EXP10-C,EXP30-C
0
1 Q CERT EXP02-C,EXP10-C,EXP30-C
2
157 S CERT STR05-C,STR30-C
5
170 S CERT DCL07-C,EXP37-C
-
41 D CERT EXP37-C
-
42 D CERT DCL30-C
-
43 D CERT INT32-C,INT33-C
0
248 S CERT INT33-C
-
45 D CERT EXP08-C,EXP34-C
-
49 D CERT FIO42-C
0
326 S CERT DCL31-C
0
344 S CERT EXP32-C
-
51 D CERT MEM30-C
0
355 S CERT DCL32-C
0
403 S CERT INT34-C
0
433 S CERT INT02-C,INT31-C
0
434 S CERT INT02-C,INT31-C,STR34-C
0
442 S CERT INT02-C,FLP33-C
0
443 S CERT INT02-C,FLP33-C
0
444 S CERT FLP33-C
0
456 S CERT MSC31-C
-
57 D CERT EXP33-C
0
476 S CERT ARR30-C
0
480 S CERT DCL33-C
0
483 S CERT MEM34-C
0
484 S CERT MEM31-C
0
487 S CERT MEM35-C
0
489 S CERT DCL33-C,FIO43-C
0
493 S CERT INT32-C
0
494 S CERT INT32-C
5
496 S CERT EXP37-C
-
61 X CERT DCL32-C

Number of Violations LDRA Code (M) Mandatory Standards CERT Code
-
64 X CERT ARR30-C
-
69 D CERT EXP33-C
0
562 S Use of ++,-- or = in macro parameters. CERT PRE31-C
-
75 D CERT FIO31-C
-
68 X CERT DCL00-C
-
69 X CERT ARR30-C
0
573 S Macro concatenation of uni char names. CERT PRE30-C
0
575 S Linkage differs from previous declaration. CERT DCL36-C
0
576 S Function pointer is of wrong type. CERT DCL35-C,EXP08-C


Number of Violations LDRA Code (C) Checking (Mandatory) Standards CERT Code

No Standards have been set as Checking.

Number of Violations LDRA Code (O) Optional Standards CERT Code
0
5 S CERT MSC03-C
1 12 S CERT MSC01-C
0
21 S CERT DCL07-C
-
1 D CERT MSC13-C
-
4 D CERT MSC13-C
-
7 D CERT MSC13-C
-
8 D CERT MSC08-C
-
15 D CERT MSC13-C
3 41 S CERT DCL10-C,DCL11-C
7 44 S CERT DCL03-C,INT06-C
0
50 S CERT INT13-C
0
52 S CERT INT02-C
0
54 S CERT EXP06-C
0
57 S CERT MSC03-C,MSC12-C
0
58 S CERT MSC03-C
0
59 S CERT MSC03-C
0
73 S CERT INT12-C
25 79 S CERT PRE03-C
0
81 S CERT PRE07-C
0
85 S CERT INT09-C
0
95 S CERT EXP11-C
0
99 S CERT MSC02-C
0
101 S CERT INT02-C
-
27 D CERT DCL15-C
0
113 S CERT MSC09-C
36 77 S CERT PRE02-C
11 78 S CERT PRE01-C,PRE02-C
0
96 S CERT INT02-C
0
115 S CERT STR03-C
0
119 S CERT MSC04-C
0
120 S CERT INT13-C
0
125 S CERT PRE05-C
0
131 S CERT DCL01-C
0
132 S CERT MSC02-C
0
133 S CERT EXP02-C
0
135 S CERT DCL07-C
0
139 S CERT MSC07-C
0
140 S CERT MSC07-C
0
176 S CERT MSC10-C
0
177 S CERT DCL04-C
10 200 S CERT DCL00-C
2 201 S CERT DCL06-C,EXP07-C,EXP09-C
0
203 S CERT EXP05-C
0
218 S CERT PRE04-C
1 243 S CERT PRE06-C
63 273 S CERT PRE03-C
0
299 S CERT DCL05-C
0
1 J CERT MSC07-C
0
302 S CERT MSC04-C
0
329 S CERT INT07-C

Number of Violations LDRA Code (O) Optional Standards CERT Code
2 331 S CERT INT13-C
0
332 S CERT INT02-C
0
334 S CERT INT02-C
2 340 S CERT PRE00-C
0
352 S CERT DCL12-C
-
50 D CERT MEM00-C
0
361 S CERT EXP00-C
0
376 S CERT MSC10-C
2 381 S CERT DCL05-C
3 382 S CERT EXP12-C
-
53 D CERT EXP08-C
0
387 S CERT DCL08-C
0
400 S CERT EXP03-C
0
401 S CERT ARR00-C
0
406 S CERT EXP02-C
-
54 D CERT EXP08-C
0
408 S CERT EXP02-C
0
432 S CERT INT07-C
0
438 S CERT EXP08-C
0
439 S CERT INT15-C
0
440 S CERT INT15-C
0
446 S CERT INT02-C
0
452 S CERT INT02-C
0
457 S CERT INT02-C
5 458 S CERT INT02-C,INT07-C
0
486 S CERT FIO00-C
0
488 S CERT INT08-C
0
491 S CERT INT02-C
-
61 D CERT DCL15-C
-
62 D CERT DCL13-C
0
515 S CERT DCL04-C
-
65 D CERT MSC12-C
-
70 D CERT MSC12-C
0
553 S Function and proto should both be static. CERT DCL15-C
-
72 D CERT EXP10-C
-
67 X CERT DCL02-C
-
74 D CERT EXP10-C
0
568 S #include "filename" uses standard library name. CERT PRE04-C
0
577 S Sizeof argument is a pointer. CERT EXP01-C
0
578 S Sizeof used in arithmetic expression. CERT EXP03-C
-
78 D CERT DCL00-C
0
584 S Remainder of % op could be negative. CERT INT10-C
0
585 S Bitwise and arith operations on same data. CERT INT14-C
0
586 S Format is not %j for user defined type. CERT INT15-C


Number of Mandatory Standards checked 39
Number of Checking Standards checked 0
Number of Optional Standards checked 77
Total Standards checked 116






OVERALL RESULT: FAIL




Out of 6 program components, 2 (33.33 %) pass ( of which 1 conditionally passes ) and 4 fail ( of which 0 fail only because of insufficient comments )

Procedure Results

Quality Result   Procedure   Source File   Unique Violations   Failure Density  
          (Viols/R.Line %)  
Conditional Pass Global Program
FAIL sig_exit irssi.c 11 - 67 -
Pass sig_reload irssi.c 0 0
FAIL noui_init irssi.c 33 - 60 -
FAIL noui_deinit irssi.c 11 - 33 -
FAIL main irssi.c 44 - 45 -


Global Information

Source Files in Group

Name Last Modification Date
D:\Code\SAMATE\SATE2009\sate2009_C_test_cases\c\irssi\irssi-0.8.14\src\fe-none\irssi.c Tue Jul 21 11:48:01 2009




Global Basic Information

Number of procedures: 5
Number of locally uncalled procedures: 0
Maximum loop depth: 1
Total Cyclomatic Complexity: 3
Number of reformatted executable lines: 64
Number of lines of comments: 48



Summary Report on all Program Components



Globals / code outside procedures - Conditional Pass

Standards Violation Summary - All files

Code File: Src Line Violation Standard
O irssi.c: 21 Included file not protected with #define. CERT PRE06-C
O common.h: 4 Found #define. CERT PRE03-C
O common.h: 6 Found #define. CERT PRE03-C
O common.h: 7 Found #define. CERT PRE03-C
O common.h: 9 Found #define. CERT PRE03-C
O common.h: 9 Define used for numeric constant. CERT DCL00-C
O common.h: 47 Found #define. CERT PRE03-C
O common.h: 48 Found #define. CERT PRE03-C
O common.h: 49 Found #define. CERT PRE03-C
O common.h: 50 Found #define. CERT PRE03-C
O common.h: 51 Found #define. CERT PRE03-C
O common.h: 52 Found #define. CERT PRE03-C
O common.h: 56 Found #define. CERT PRE03-C
O common.h: 70 Found #define. CERT PRE03-C
O common.h: 71 Found #define. CERT PRE03-C
O common.h: 71 Literal value requires a U suffix. CERT INT13-C
O common.h: 86 Found #define. CERT PRE03-C
O common.h: 86 Literal value requires a U suffix. CERT INT13-C
O common.h: 86 Macro contains unacceptable items CERT PRE03-C
O common.h: 88 Found #define. CERT PRE03-C
O common.h: 88 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
O common.h: 88 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 90 Found #define. CERT PRE03-C
O common.h: 93 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 93 Macro contains unacceptable items CERT PRE03-C
O common.h: 96 Found #define. CERT PRE03-C
O common.h: 96 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 96 Macro contains unacceptable items CERT PRE03-C
O common.h: 97 Found #define. CERT PRE03-C
O common.h: 97 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 97 Macro contains unacceptable items CERT PRE03-C
O common.h: 98 Found #define. CERT PRE03-C
O common.h: 98 Use of banned function or variable. CERT DCL03-C,INT06-C
O common.h: 98 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 98 Macro contains unacceptable items CERT PRE03-C
O common.h: 99 Found #define. CERT PRE03-C
O common.h: 99 Use of banned function or variable. CERT DCL03-C,INT06-C
O common.h: 99 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 99 Macro contains unacceptable items CERT PRE03-C
O common.h: 100 Found #define. CERT PRE03-C
O common.h: 100 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 100 Macro contains unacceptable items CERT PRE03-C
O common.h: 101 Found #define. CERT PRE03-C
O common.h: 101 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 101 Macro contains unacceptable items CERT PRE03-C
O common.h: 102 Found #define. CERT PRE03-C
O common.h: 102 Use of banned function or variable. CERT DCL03-C,INT06-C
O common.h: 102 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 102 Macro contains unacceptable items CERT PRE03-C
O common.h: 103 Found #define. CERT PRE03-C

Code File: Src Line Violation Standard
O common.h: 103 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 103 Macro contains unacceptable items CERT PRE03-C
O common.h: 104 Found #define. CERT PRE03-C
O common.h: 104 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 104 Macro contains unacceptable items CERT PRE03-C
O common.h: 105 Found #define. CERT PRE03-C
O common.h: 105 Use of banned function or variable. CERT DCL03-C,INT06-C
O common.h: 105 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 105 Macro contains unacceptable items CERT PRE03-C
O common.h: 106 Found #define. CERT PRE03-C
O common.h: 106 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 106 Macro contains unacceptable items CERT PRE03-C
O common.h: 107 Found #define. CERT PRE03-C
O common.h: 107 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 107 Macro contains unacceptable items CERT PRE03-C
O common.h: 108 Found #define. CERT PRE03-C
O common.h: 108 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 108 Macro contains unacceptable items CERT PRE03-C
O common.h: 109 Found #define. CERT PRE03-C
O common.h: 109 Use of banned function or variable. CERT DCL03-C,INT06-C
O common.h: 109 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 109 Macro contains unacceptable items CERT PRE03-C
O common.h: 110 Found #define. CERT PRE03-C
O common.h: 110 Macro replacement list needs parentheses. CERT PRE02-C
O common.h: 110 Macro contains unacceptable items CERT PRE03-C
O module.h: 3 Found #define. CERT PRE03-C
O modules.h: 4 Found #define. CERT PRE03-C
O modules.h: 4 Macro replacement list needs parentheses. CERT PRE02-C
O modules.h: 7 Found #define. CERT PRE03-C
O modules.h: 7 Macro replacement list needs parentheses. CERT PRE02-C
O modules.h: 10 Found #define. CERT PRE03-C
O modules.h: 10 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
O modules.h: 10 Macro replacement list needs parentheses. CERT PRE02-C
O modules.h: 13 Found #define. CERT PRE03-C
O modules.h: 13 Macro replacement list needs parentheses. CERT PRE02-C
O modules.h: 16 Found #define. CERT PRE03-C
O modules.h: 16 Macro replacement list needs parentheses. CERT PRE02-C
O modules.h: 21 Found #define. CERT PRE03-C
O modules.h: 24 Found #define. CERT PRE03-C
O modules.h: 24 Macro replacement list needs parentheses. CERT PRE02-C
O modules.h: 27 Enum, struct or union not typedeffed. CERT DCL05-C
O modules.h: 47 Enum, struct or union not typedeffed. CERT DCL05-C
O modules.h: 59 Found #define. CERT PRE03-C
O modules.h: 59 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
O modules.h: 59 Macro replacement list needs parentheses. CERT PRE02-C
O modules.h: 65 Found #define. CERT PRE03-C
O modules.h: 65 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
O modules.h: 65 Use of banned function or variable. CERT DCL03-C,INT06-C
O modules.h: 65 Use of function like macro. CERT PRE00-C
O modules.h: 67 Found #define. CERT PRE03-C

Code File: Src Line Violation Standard
O modules.h: 67 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
O modules.h: 67 Use of banned function or variable. CERT DCL03-C,INT06-C
O modules.h: 67 Use of function like macro. CERT PRE00-C
O signals.h: 4 Found #define. CERT PRE03-C
O signals.h: 4 Define used for numeric constant. CERT DCL00-C
O signals.h: 5 Found #define. CERT PRE03-C
O signals.h: 5 Define used for numeric constant. CERT DCL00-C
O signals.h: 6 Found #define. CERT PRE03-C
O signals.h: 6 Macro replacement list needs parentheses. CERT PRE02-C
O signals.h: 8 Found #define. CERT PRE03-C
O signals.h: 8 Define used for numeric constant. CERT DCL00-C
O signals.h: 20 Found #define. CERT PRE03-C
O signals.h: 20 Macro replacement list needs parentheses. CERT PRE02-C
O signals.h: 20 Macro contains unacceptable items CERT PRE03-C
O signals.h: 22 Found #define. CERT PRE03-C
O signals.h: 22 Macro replacement list needs parentheses. CERT PRE02-C
O signals.h: 22 Macro contains unacceptable items CERT PRE03-C
O signals.h: 24 Found #define. CERT PRE03-C
O signals.h: 24 Macro replacement list needs parentheses. CERT PRE02-C
O signals.h: 24 Macro contains unacceptable items CERT PRE03-C
O signals.h: 27 Found #define. CERT PRE03-C
O signals.h: 27 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
O signals.h: 27 Macro replacement list needs parentheses. CERT PRE02-C
O signals.h: 27 Macro contains unacceptable items CERT PRE03-C
O signals.h: 29 Found #define. CERT PRE03-C
O signals.h: 29 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
O signals.h: 29 Macro replacement list needs parentheses. CERT PRE02-C
O signals.h: 29 Macro contains unacceptable items CERT PRE03-C
O signals.h: 31 Found #define. CERT PRE03-C
O signals.h: 32 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
O signals.h: 32 Macro replacement list needs parentheses. CERT PRE02-C
O signals.h: 32 Macro contains unacceptable items CERT PRE03-C
O signals.h: 36 Found #define. CERT PRE03-C
O signals.h: 36 Macro replacement list needs parentheses. CERT PRE02-C
O signals.h: 36 Macro contains unacceptable items CERT PRE03-C
O signals.h: 38 Found #define. CERT PRE03-C
O signals.h: 38 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
O signals.h: 38 Macro replacement list needs parentheses. CERT PRE02-C
O signals.h: 38 Macro contains unacceptable items CERT PRE03-C
O signals.h: 43 Ellipsis used in procedure parameter list. CERT DCL10-C,DCL11-C
O signals.h: 44 Ellipsis used in procedure parameter list. CERT DCL10-C,DCL11-C
O signals.h: 47 Ellipsis used in procedure parameter list. CERT DCL10-C,DCL11-C
O signals.h: 61 Found #define. CERT PRE03-C
O signals.h: 61 Macro replacement list needs parentheses. CERT PRE02-C
O signals.h: 67 Found #define. CERT PRE03-C
O signals.h: 68 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
O signals.h: 68 Macro replacement list needs parentheses. CERT PRE02-C
O signals.h: 70 Found #define. CERT PRE03-C
O signals.h: 70 Macro parameter not in brackets. CERT PRE01-C,PRE02-C
O signals.h: 70 Macro replacement list needs parentheses. CERT PRE02-C

Code File: Src Line Violation Standard
O core.h: 7 Found #define. CERT PRE03-C
O core.h: 7 Define used for numeric constant. CERT DCL00-C
O core.h: 8 Found #define. CERT PRE03-C
O core.h: 8 Define used for numeric constant. CERT DCL00-C
O core.h: 9 Found #define. CERT PRE03-C
O core.h: 9 Define used for numeric constant. CERT DCL00-C
O core.h: 10 Found #define. CERT PRE03-C
O core.h: 10 Define used for numeric constant. CERT DCL00-C
O core.h: 11 Found #define. CERT PRE03-C
O core.h: 11 Define used for numeric constant. CERT DCL00-C
O core.h: 12 Found #define. CERT PRE03-C
O core.h: 12 Define used for numeric constant. CERT DCL00-C

[ Top of Report | Key to Terms | Procedure Table | Contents ]






sig_exit
(40 to 43 irssi.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 42 function call with no prior declaration. CERT EXP37-C
M 42 Procedure call has no prototype and no defn. CERT DCL07-C,EXP37-C


[ Top of Report | Key to Terms | Procedure Table | Contents ]






noui_init
(50 to 68 irssi.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 52 Procedure call has no prototype and no defn. CERT DCL07-C,EXP37-C
M 52 function call with no prior declaration. CERT EXP37-C
M 61 Actual and formal parameters inconsistent (MR). CERT EXP37-C
M 60 Actual and formal parameters inconsistent (MR). CERT EXP37-C


[ Top of Report | Key to Terms | Procedure Table | Contents ]






noui_deinit
(70 to 80 irssi.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 77 Actual and formal parameters inconsistent (MR). CERT EXP37-C
M 76 Actual and formal parameters inconsistent (MR). CERT EXP37-C


[ Top of Report | Key to Terms | Procedure Table | Contents ]






main
(82 to 114 irssi.c) - FAIL

Standards Violation Summary

Code Line Violation Standard
M 89 Modification of string literal. CERT STR05-C,STR30-C
M 101 Modification of string literal. CERT STR05-C,STR30-C
M 106 function call with no prior declaration. CERT EXP37-C
M 106 Procedure call has no prototype and no defn. CERT DCL07-C,EXP37-C
M 107 function call with no prior declaration. CERT EXP37-C
M 107 Procedure call has no prototype and no defn. CERT DCL07-C,EXP37-C
M 108 function call with no prior declaration. CERT EXP37-C
M 108 Procedure call has no prototype and no defn. CERT DCL07-C,EXP37-C
M 105 Actual and formal parameters inconsistent (MR). CERT EXP37-C
M 91 Actual and formal parameters inconsistent (MR). CERT EXP37-C


[ Top of Report | Key to Terms | Procedure Table | Contents ]




Key to Terms


Standards violations for procedures are printed in tables with code markers as follows:


Code (Line) Violation Standard
M (Source line number) [Text of Mandatory standard] [Appropriate rule reference]
C   [Text of Checking standard]  
O   [Text of Optional standard]  
[Source: Text of line from Source file]


                         Checking standards are considered mandatory but individual instances may be overridden by adding annotations to the source code
                         Optional standards provide additional quality criteria but may be violated

                         For some standards violations, additional information is provided in results tables
                         Note that source lines do not show macro expansions

                         "Off" in Summary tables indicates that a standard is switched off in the pen.dat file
                         "MR" in Summary tables indicates a MISRA Restricted standard which cannot be checked without the MISRA licence option.


A summary is given of the pass/fail result of each program component as follows:


Components which pass all standards are marked: Pass
Components which fail only Optional standards are marked: Conditional Pass
Components which fail on insufficient comments only are marked: Comment FAIL
Components which violate Mandatory standards are marked: FAIL



Procedure Results table breakdown (Example Only)


Unique Violations   Failure Density  
    (Viols/R.Line %)  
65 - 150
35 - 39 -



                         The Violation density for a function is the number of violations per reformatted line, expressed as a percentage.
                         It is an indication of code quality.

                         Functions with a high violation density are likely to be smaller functions with a large number of violations.

                         Lower density may indicate larger functions with fewer violations.

                                        (nViols / nRefLines) x 100

                         where:

                                        nViols = number of standard violations in a function.

                         and:

                                        nRefLines = number of reformatted lines in a function.

                         The unique standards failure ratio is an indication of variety of standards violations in a module.

                         Thus a function containing one instance of several different standards will have a high ratio,
                         while a function that has violated only one standards will have a low ratio.


[ Top of Report | Procedure Table | Contents ]


End of Code Review Report

Copyright © 2009 Liverpool Data Research Associates